<template>
  <view class="home-container">
    <!-- 主内容区域 -->
    <view class="content-area">
      <rich-text :nodes="richText"></rich-text>
    </view>

    <!-- 固定在底部的TabBar -->
    <view class="tabbar-container">
      <UserTabBar />
    </view>
  </view>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import UserTabBar from '@/components/tabbar/UserTabBar.vue'
import { useRequest } from '@/api'

const { GET_POSTER_IMG } = useRequest()
const richText = ref('')
const getList1 = async () => {
  const res = await GET_POSTER_IMG()
  if (res.code === 1) {
    richText.value = res.data.poster
  }
}
onMounted(() => {
  getList1()
})
</script>

<style lang="scss" scoped>
.home-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
 
}

.content-area {
  flex: 1;
  padding: 20rpx;
  padding-bottom: 180rpx;
 
}

.tabbar-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #fff;
  box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
}
</style>
